M291 S5 J1 F250 L150 H450 R"Set Left Tool Temperature" P"Please set the temperature for the filament previously loaded in the Left Tool.<br>If new machine, set to 250°C"
var ll = input
  
M291 S5 J1 F{var.ll} L150 H450 R"Set Right Tool Temperature" P"Please set the temperature for the filament previously loaded in the Right Tool.<br>If new machine, set to 250°C"
var rr = input

var delta = -75

G10 P0 R{var.ll + var.delta} S{var.ll + var.delta}
G10 P1 R{var.rr + var.delta} S{var.rr + var.delta}
G10 P2 R{var.ll + var.delta,var.rr + var.delta} S{var.ll + var.delta,var.rr + var.delta}
G10 P3 R{var.ll + var.delta,var.rr + var.delta} S{var.ll + var.delta,var.rr + var.delta}

M568 P0 A2
M568 P1 A2


M291 S2 R"Please Remove the Build Plate" P"To avoid damaging your machine, remove the build plate from the build platform.<br>Click ""OK"" when you are ready to proceed."

if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed || !move.axes[3].homed
  M98 P"0:/sys/homeall.g" S1
  M291 S0 T15 R"Homing Axes" P"Axes are not homed. Homing now. Please wait..."

if state.currentTool != 0
  T0

G90
G1 X-999 U999 Y-75 F18000

M116 P0 S10
M116 P1 S10

T3
M83                 ; relative extruder moves
G1 E-50 F{60}*{10}   ; retract filament

M98 P"0:/sys/nozzlewipe.g" C1
M400
while iterations < 2
  M98 P"0:/sys/nozzlewipe.g" L1 C1
  M400

G1 F18000 X-50 Y-150 Z125  ; Move tools to the cleaning position
M291 S3 R"Please Clean Both Nozzles" P"Use a metal brush to clean both nozzles thoroughly to prevent machine damage.<br>Click ""OK"" when you are ready to proceed or ""Cancel"" to stop."

M98 P"0:/sys/homeall.g" S1

G29 S2     ; disable Mesh Bed Leveling
M290 R0 S0
M208 Z-5 S1
M558 K0 P8 C"1.io4.in" H5 F100 T18000              ; define Z probe parameters
M98 P"0:/user/probeoffset.g"                       ; load global variables
T0
G1 U999 F18000
M42 P4 S1                                              ; Turn on relay









M98 P"0:/macros/System/Calibration/Auto Calibration Macros/Tool Height Auto Calibration" S1
M400

M98 P"0:/macros/System/Calibration/Auto Calibration Macros/Z - Offset Calibration" S1
M400

M98 P"0:/macros/System/Calibration/Auto Calibration Macros/Mesh Bed calibration" S1
M400

M98 P"0:/macros/System/Calibration/Auto Calibration Macros/XY - Offset Calibration" S1
M400










G10 P0 S0 R0
G10 P1 S0 R0
G10 P2 S0 R0
G10 P3 S0 R0

M208 Z0 S1
M558 K0 P8 C"1.io4.in" H5 F300 T18000
M98 P"0:/user/probeoffset.g"                       ; load global variables

G90
G1 X-999 U999 Y150 Z100 F18000